package com.xq.jltx.learnopenglandroidpro.tutorial.lesson4;

import android.content.Context;
import android.opengl.GLSurfaceView;

import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;

/**
 * @author jltxseo
 * Created by junlintianxia on 2018/07/24.
 */
public class TutorialLessonFourRenderer implements GLSurfaceView.Renderer{
    private Context context;

    public TutorialLessonFourRenderer(Context context) {
        this.context = context;
    }

    @Override
    public void onSurfaceCreated(GL10 gl, EGLConfig config) {
        TutorialLessonFourNative.nativeOnSurfaceCreate(context.getResources().getAssets());
    }

    @Override
    public void onSurfaceChanged(GL10 gl, int width, int height) {
        TutorialLessonFourNative.nativeOnSurfaceChange(width,height);
    }

    @Override
    public void onDrawFrame(GL10 gl) {
        TutorialLessonFourNative.nativeOnDrawFrame();
    }
}
